package com.ming.reentrantLock;

/**
 * @Auther: tangC
 * @Date: 2020/7/9 13:59
 * @Description:
 */
public class TestLock {
    public static void main(String[] args) {
        ReentrantLockDemo reentrantLockDemo = new ReentrantLockDemo();
        Thread read1 = new Thread(reentrantLockDemo,"read1");
        Thread read2= new Thread(reentrantLockDemo,"read2");
        Thread read3 = new Thread(reentrantLockDemo,"read3");
        Thread read4= new Thread(reentrantLockDemo,"read4");

        Thread write1 = new Thread(reentrantLockDemo,"write1");
        Thread write2= new Thread(reentrantLockDemo,"write2");
//        read1.start();
//        read2.start();
//        read3.start();
//        read4.start();

        write1.start();
        write2.start();
    }
}
